﻿using Max.PH5_2010A.Shopping.DataAccess;
using Max.PH5_2010A.Shopping.IRespository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH5_2010A.Shopping.Respository
{
    public class UnitOfWork : IUnitOfWork
    {
        private MaxPH52010AShoppingDbContext _context;

        public UnitOfWork(MaxPH52010AShoppingDbContext context)
        {
            _context = context;
        }

        public MaxPH52010AShoppingDbContext GetDbContext()
        {
            return _context;
        }

        public int SaveChanges()
        {
            return _context.SaveChanges();
        }
    }
}
